Portable electronic devices may comprise an electrochemical battery as a power source. Such a battery may be rechargeable in situ. Rechargeable batteries may swell both over their life time and during charging. Battery swelling may depend upon various factors, including battery chemistry, charging voltages, charging current. Rechargeable batteries may also lose capacity over the course of their life time.